﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;

namespace Acme.BookStore.FormWhx.Storehouse
{
    /// <summary>
    /// 库管部门
    /// </summary>
    public class ManagementDeptModel : AuditedAggregateRoot<int>
    {
        /// <summary>
        /// 部门编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 父部门ID
        /// </summary>
        public int? ParentId { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsActive { get; set; }

        protected ManagementDeptModel() { }

        public ManagementDeptModel(
            int id,
            string code,
            string name,
            int? parentId = null,
            int sort = 0,
            bool isActive = true)
            : base(id)
        {
            Code = code;
            Name = name;
            ParentId = parentId;
            Sort = sort;
            IsActive = isActive;
        }
    }
}
